home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01lab5.zip / SPACEMON / READ_SEN.ADA < prev    next >
Text File  |  1992-03-17  |  858b  |  33 lines

  1. with Spacecraft_Sensor_Interface,Checker;
  2. use Spacecraft_Sensor_Interface,Checker;
  3. with Types; use Types;
  4. with CRT_Output; use CRT_Output;
  5. with Console; use Console;
  6.  
  7. procedure Read_Sensors is
  8.  
  9. Pressure : PRESSURE_ARRAY;
  10. Radiation : RADIATION_ARRAY;
  11. Temperature : TEMPERATURE_ARRAY;
  12. ch : CHARACTER;
  13.  
  14. begin
  15.     loop
  16.         Update;
  17.         for i in SPACECRAFT_SECTION'FIRST .. SPACECRAFT_SECTION'LAST loop
  18.             Pressure(i).value := Sensed_Value(i);
  19.             Radiation(i).value := Sensed_Value(i);
  20.             Temperature(i).value := Sensed_Value(i);            
  21.             
  22.             Pressure(i).in_range := Check_Value(Pressure(i).value);
  23.             Radiation(i).in_range := Check_Value(Radiation(i).value);
  24.             Temperature(i).in_range := Check_Value(Temperature(i).value);
  25.         end loop;
  26.         Display(Pressure);
  27.         Display(Radiation);
  28.         Display(Temperature);
  29.         Console.Get(ch);
  30.         exit when ch = 'q';
  31.     end loop;
  32.  
  33. end Read_Sensors;